package com.example.myapplication.util;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.example.myapplication.MyApplication;
import com.example.myapplication.R;

public class GlideUtil {
    public static void loadHead(String head, ImageView imageView){
        RequestOptions error = new RequestOptions().placeholder(R.mipmap.head_holder).error(R.mipmap.head_holder);
        Glide.with(MyApplication.myApp).load(head).apply(error).into(imageView);
    }
    public static void loadImg(String url,ImageView imageView){
        RequestOptions error = new RequestOptions().placeholder(R.mipmap.gray).error(R.mipmap.gray);
        Glide.with(MyApplication.myApp).load(url).apply(error).into(imageView);
    }
}
